<?php

namespace app\api\logic;

use app\common\model\Homepage;

class HomepageLogic
{
    protected Homepage $model;

    public function __construct()
    {
        $this->model = new Homepage();
    }

    /**
     * 图文列表
     * @return bool|\PDOStatement|string|\think\Collection
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public function getList()
    {
        return $this->model->field('id,name,image,url,createtime')
            ->order('id Asc')
            ->select();
    }

}